<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1">
  <title>quill富文本编辑器</title>
  <style>
    .btn{
      border:1px solid #eee;
      padding: 15px;
      margin-top: 20px;
      cursor: pointer;
      background: #00aac5;
      color: #fff;
    }
    .content{
      margin-top: 20px;
      padding:12px;
      border:1px solid #eee;
      background: #000;
      color: #fff;
      display: none;
    }
  </style>
  <script src="https://cdn.quilljs.com/1.3.3/quill.js"></script>
  <link href="https://cdn.quilljs.com/1.3.3/quill.snow.css" rel="stylesheet">
  <script src="https://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js" type="text/javascript"></script>
</head>
<body>
<!-- 编辑器 -->
<div id="editor">
  <p>Hello World!</p>
  <p>Some initial <strong>bold</strong> text</p>
  <p><br></p>
</div>
<!-- 按钮 -->
<div style="padding: 15px;margin-top: 20px;">
  <span onclick="nihao();" class="btn">获取编辑器内容</span>
</div>
<!-- 获取内容 -->
<div class="content">
</div>

<script>
  var quill = new Quill('#editor', {
    theme: 'snow'
  });
  function nihao() {
    let t = quill.container.firstChild.innerHTML
    console.log(t)
    $('.content').css('display', 'block')
    $('.content').text(t)
  }
</script>
</body>
</html>
